In conventional graphics processing systems, an object to be displayed is typically represented as a set of one or more graphics primitives. Examples of graphics primitives include one-dimensional graphics primitives, such as lines, and two-dimensional graphics primitives, such as polygons.
Conventional graphics processing systems sometimes implement techniques for clipping graphics primitives. Clipping typically refers to a set of operations that determine which portions of an object are to be displayed with respect to a set of clipping planes. Various techniques have been developed for clipping graphics primitives. Of these techniques, the Sutherland-Hodgeman technique is perhaps the most commonly used. The Sutherland-Hodgeman technique can be used to clip a polygon with respect to a set of clipping planes by using an output from a set of clipping operations with respect to one clipping plane as an input for a set of clipping operations with respect to another clipping plane, and so on until all clipping planes have been processed. For example, to clip a polygon with respect to six clipping planes, the Sutherland-Hodgeman technique typically clips each edge of the polygon with respect to a first clipping plane to produce a first clipped polygon. Each edge of the first clipped polygon is then typically clipped with respect to a second clipping plane to produce a second clipped polygon. The second clipped polygon is then typically clipped with respect to a third clipping plane, and so on until all six clipping planes have been processed.
Conventional clipping techniques can be computationally intensive, particularly when clipping polygons with respect to multiple clipping planes. In the case of the Sutherland-Hodgeman technique, each clipping operation with respect to a particular clipping plane can involve a number of computationally intensive data manipulations. One significant drawback of the Sutherland-Hodgeman technique is that this technique typically clips a polygon with respect to all clipping planes even if the polygon simply requires clipping with respect to a subset of the clipping planes. Indeed, in many instances, the polygon simply requires clipping with respect to a single one of the clipping planes. Another significant drawback of the Sutherland-Hodgeman technique is that this technique typically clips all edges of a polygon with respect to a particular clipping plane even if simply a subset of the edges requires clipping with respect to that clipping plane. Indeed, in many instances, simply a pair of the edges requires clipping with respect to that clipping plane. As a result of these drawbacks, the Sutherland-Hodgeman technique can lead to inefficiencies in terms of performing unnecessary clipping operations. In particular, such inefficiencies can translate into processing times that are longer than desired and that are relatively unpredictable, particularly since a number of edges to be clipped can increase in a variable manner after clipping is performed with respect to each successive clipping plane. In addition, such inefficiencies can translate into enhanced implementation cost and complexity.
It is against this background that a need arose to develop the apparatus, system, and method described herein.